<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
    <title>Hawkular alert</title>
    <meta name="robots" content="noindex,nofollow" />
    <link rel="shortcut icon" href="https://dl.dropboxusercontent.com/u/2730435/favicon.ico" type="image/x-icon" />

    <style type="text/css">

        /* Reset styles */
        body{margin:0; padding:0;}

        /* Styles */

        a img {
            border-style:none;
        }

        a.link:hover {
            color: #00618a!important;
            text-decoration: underline!important;
        }

        a.btn-primary {
            background-image: -webkit-linear-gradient(top,#00a8e1 0,#0085cf 100%);
            background-image: -o-linear-gradient(top,#00a8e1 0,#0085cf 100%);
            background-image: linear-gradient(to bottom,#00a8e1 0,#0085cf 100%);
            background-repeat: repeat-x;
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00a8e1', endColorstr='#ff0085cf', GradientType=0);
        }

        a.btn-primary:hover {
            background-color: #0085cf!important;
            background-image: none!important;
        }

        /* Mobile sites */
        @media only screen and (max-width: 640px){

            body{width:100% !important; min-width:100% !important;} /* Force iOS Mail to render the email at full width. */

            table[id="table-body"],
            table[class="flexible-container"]{width:100% !important;}

            .bg-container {
                padding:0!important;
            }
        }

    </style>

</head>
<body>
<div style="display:table;width:100%;border-spacing:0;border-collapse:collapse;margin:auto 0">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" style="margin: 0 auto;">
        <tr>
            <td bgcolor="#f2f2f2" class="bg-container" style="padding:20px; background-color:#f2f2f2;">
                <table width="600" border="0" cellpadding="0" cellspacing="0" id="table-body" style="margin:0 auto;">

                    <!-- Email content text / Browser link -->

                    <tr>
                        <td>
                            <div style="color:transparent;font-size:0px;height:0;"><#if subject??><${subject}</#if> View more details...</div>
                        </td>
                    </tr>

                    <!-- Email content -->

                    <tr>
                        <td style="background-color:#ffffff">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin:0 auto;">

                                <!-- Header -->

                                <tr>
                                    <td>
                                        <table width="600" cellspacing="0" cellpadding="0" border="0" class="flexible-container" style="margin:0 auto;">
                                            <tr>
                                                <td style="padding:30px 30px 40px 30px;">
                                                    <a href="<#if url??>${url}<#else>http://www.hawkular.org</#if>"
                                                       target="_blank"
                                                       style="display:inline-block;">
                                                        <img src="" alt="Hawkular logo" border="0" width="180" height="38" style="display:block; margin:0;" />
                                                    </a>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>

                                <!-- Content -->

                                <tr>
                                    <td align="center"
                                        <#if alert?? && alert.status?? && alert.status == 'RESOLVED'>
                                            style="background-color:#f0f7ef; padding:40px 30px 33px 30px;"
                                        <#else>
                                            style="background-color:#faeceb; padding:40px 30px 33px 30px;"
                                        </#if>>
                                        <table width="540" cellspacing="0" cellpadding="0" border="0" class="flexible-container" style="margin:0 auto;">
                                            <tr>
                                                <td align="center" style="padding-bottom:25px;">
                                                    <#if status?? && status == 'resolved'>
                                                    <img src="
                                                    " alt="Icon: alert resolved flag" border="0" width="60"
                                                         height="52" />
                                                    <#else>
                                                    <img src="" alt="Icon: alert flag" border="0" width="60" height="52" />
                                                    </#if>
                                                </td>
                                            </tr>
                                            <#list conditions as condition>
                                                <tr>
                                                    <td align="center" style="color:#333333; font-family:Open sans,sans-serif; font-size:15px; font-weight:bold; line-height:24px;">
                                                        ${condition.description}
                                                    </td>
                                                </tr>
                                                <#if condition.averageDescription??>
                                                    <tr>
                                                        <td align="center" style="color:#999999; font-family:Open sans,sans-serif; font-size:13px; line-height:21px; padding-bottom:7px;">
                                                        (Average ${condition.averageDescription})
                                                        </td>
                                                    </tr>
                                                </#if>
                                            </#list>
                                            <tr>
                                                <td align="center" style="line-height:24px; padding-bottom:15px;">
                                                    <a class="link" href="<#if baseUrl??>${baseUrl}<#else>http://www.hawkular.org</#if>" target="_blank"
                                                       style="color:#0099d3; font-family:Open sans,sans-serif;
                                                       font-size:15px; text-decoration: none;"><#if triggerDescription??>${triggerDescription}</#if></a>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center" style="color:#333333; font-family:Open sans,sans-serif; font-size:13px; line-height:21px;">
                                                    Start time: <span style="font-size:15px;"><#if event??>${event.ctime?number_to_datetime}</#if></span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center" style="color:#999999; font-family:Open sans,sans-serif; font-size:13px; line-height:21px; padding-bottom:7px;">
                                                <#if dampeningDescription??>${dampeningDescription}</#if>
                                                </td>
                                            </tr>
                                            <#if alert?? && alert.status?? && alert.status == 'ACKNOWLEDGED'>
                                                <tr>
                                                    <td align="center" style="color:#333333; font-family:Open sans,sans-serif; font-size:13px; line-height:21px;">
                                                        Acknowledge time:
                                                        <span style="font-size:15px;">${alert.currentLifecycle.stime?number_to_datetime}</span>
                                                    </td>
                                                </tr>
                                                <#if alert.currentLifecycle.user?? >
                                                    <tr>
                                                        <td align="center" style="color:#999999; font-family:Open
                                                        sans,sans-serif; font-size:13px; line-height:21px;
                                                        padding-bottom:2px;">
                                                            by ${alert.currentLifecycle.user}
                                                        </td>
                                                    </tr>
                                                </#if>
                                            </#if>
                                            <#if alert?? && alert.status?? && alert.status == 'RESOLVED'>
                                                <tr>
                                                    <td align="center" style="color:#333333; font-family:Open sans,sans-serif; font-size:13px; line-height:21px;">
                                                        Resolved time:
                                                        <span style="font-size:15px;">${alert.currentLifecycle.stime?number_to_datetime}</span>
                                                    </td>
                                                </tr>
                                                <#if alert.currentLifecycle.user?? >
                                                    <tr>
                                                        <td align="center" style="color:#999999; font-family:Open
                                                            sans,sans-serif; font-size:13px; line-height:21px;
                                                            padding-bottom:2px;">
                                                            by ${alert.currentLifecycle.user}
                                                        </td>
                                                    </tr>
                                                </#if>
                                            </#if>
                                            <#if alert?? && alert.notes?? && alert.notes?has_content >
                                                <#list alert.notes as note>
                                                 <#if note.text?? && note.user??>
                                                    <tr>
                                                        <td align="center" style="color:#999999; font-family:Open sans,sans-serif; font-size:13px; line-height:21px; padding-bottom:7px;">
                                                          ${note.text}
                                                          <br>(${note.user}, ${note.ctime?number_to_datetime})
                                                        </td>
                                                    </tr>
                                                 </#if>
                                                </#list>
                                            </#if>
                                        </table>
                                    </td>
                                </tr>

                                <!-- View -->
                                <#if baseUrl??>
                                <tr>
                                    <td>
                                        <table width="600" cellspacing="0" cellpadding="0" border="0" class="flexible-container" style="margin:0 auto;">
                                            <tr>
                                                <td align="center" style="color:#999999; font-family:Open sans,sans-serif; font-size:15px; line-height:20px; padding:40px 30px 30px 30px;">
                                                    To view metrics of this alert, access your Hawkular account.
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center" style="padding-bottom:50px;">
                                        <a class="btn-primary" href="${baseUrl}" target="_blank" style="display:block; background-color:#0085cf; border:1px solid #006e9c; border-radius:1px; color:#ffffff; font-family:Open sans,sans-serif; font-size:14px; font-weight:600; line-height:1.3333333; padding:6px 10px; text-decoration:none; width: 100px;">
                                            View Metrics
                                        </a>
                                    </td>
                                </tr>
                                </#if>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</div>
</body>
</html>